Effects for Funargs
نویسندگان
چکیده
Stack allocation and first-class functions don’t naturally mix together. In this paper we show that a type and effect system can be the detergent that helps these features form a nice emulsion. Our interest in this problem comes from our work on the Chapel language, but this problem is also relevant to lambda expressions in C++ and blocks in Objective C. The difficulty in mixing first-class functions and stack allocation is a tension between safety, efficiency, and simplicity. To preserve safety, one must worry about functions outliving the variables they reference: the classic upward funarg problem. There are systems which regain safety but lose programmerpredictable efficiency, and ones that provide both safety and efficiency, but give up simplicity by exposing regions to the programmer. In this paper we present a simple design that combines a type and effect system, for safety, with function-local storage, for control over efficiency.
منابع مشابه
{16 () Continuation-based Multiprocessing *
Any multiprocessing facility must include three features: elementary exclusion, data protection, and process saving. While elementary exclusion must rest on some hardware facility (e.g., a test-and-set instruction), the other two requirements are fulllled by features already present in applicative languages. Data protection may be obtained through the use of procedures (closures or funargs), an...
متن کاملStackability in the Simply-Typed Call-by-Value Lambda Calculus
This paper addresses two issues: (1) What it means for a higher-order, eager functional language to be implemented with a single, global, stack-based environment and (2) how the existence of such an environment can be predicted statically. The central theme is the use of the-abstraction to control the extent or lifetime of bindings. All programs in a higher-order, call-by-name language can be i...
متن کاملThe Essence of Rum A Theory of the intensional and extensional aspects of Lisp - type computation
ions such as funargs and control abstractions such as catch and throw, and co-routines. Scheme Scheme (Sussman and Steele [1975]) is the first dialect of Lisp to take abstraction and application seriously. The main components of a Scheme computation state are an expression, an environment and a continuation. A continuation is a function of one argument representing the calling context for the e...
متن کاملEstimation of Combining Ability and Gene Effects in Forage Maize (Zea mays L.) Using Line × Tester Crosses
Abstract Determination of gene effects and combining abilities is a critical stage in maize hybrid breeding. In the present study, 20 S6 lines as female and three S6 inbred lines (K18, K19 and K1264/5-1) as tester were crossed and the resulting test cross progenies were evaluated in a randomized complete block design with three replications in 2008. During the growing period, several agronomi...
متن کاملGenetic parameter estimates of body weight traits in Iran-Black sheep
The objective of the current study was to estimate the genetic parameters for body weight traits at different ages in Iran-Black sheep. Data collected during a 24-year period (1984-2008) on body weight were used to model the growth trajectory and estimate genetic parameters. Studied traits were birth weight (BW), weaning weight at 3 months of age (WW), 6 months weight (6MW), 9 months weight (9M...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- CoRR
دوره abs/1201.0023 شماره
صفحات -
تاریخ انتشار 2011